import axios from "axios";
import { ElMessage } from "element-plus";

const request = axios.create({
	baseURL: 'http://localhost:8080/',
	timeout: 10000,
});

request.interceptors.request.use(
	(config) => {
		return config;
	},
	(err) => {
		Promise.reject(err);
	}
)

request.interceptors.response.use(
	(response) => {
		return response;
	},
	(err) => {
		return Promise.reject(err.response);
	}
);

export default request;
